package com.atguigu.cloud.config;

import feign.Logger;
import feign.Retryer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author ViGrayThorn
 * @since 1.0.0
 * date 2025-09-09 15:47:31
 */
@Configuration
public class FeignConfig {
	@Bean
	public Retryer myRetryer() {
		//maxAttempts最大请求次数（1+9）
		//maxPeriod重试最大间隔时间10s
		//period初始间隔时间100ms
		return new Retryer.Default(100, 10, 10);
	}

	@Bean
	Logger.Level feignLoggerLevel(){
		return Logger.Level.FULL;
	}
}
